package com.yuanian.timingwheel.test;

import com.yuanian.timingwheel.config.JobConfig;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import java.util.Random;

@Component

public class Person {



    @Transactional
    public Teacher run() {

        //JobConfig.getInstance().getJdbcTemplate().execute("insert into TP_TW_TEST values('1','xxx')");
        System.out.println("xxxxxxxxxxxxxx");
        return new Teacher("ttt");
    }

    @Transactional
    public void run2() {
        //int i = 1/0;
        System.out.println("yyyyyyyyy");
        //JobConfig.getInstance().getJdbcTemplate().execute("insert into TP_TW_TEST values('2','yyyy')");
    }
}
